package com.unionpay.upyzt.model;

import com.unionpay.upyzt.exception.UpyztException;
import com.unionpay.upyzt.net.APIResource;
import com.unionpay.upyzt.net.RequestOptions;
import com.unionpay.upyzt.resp.BalanceTxnPaginationResp;
import lombok.experimental.Accessors;

import java.util.Map;

@Accessors(chain = true)
public class BalanceTransaction extends APIResource {

    /**
     * 电子账簿流水查询
     *
     * @param params 请求参数
     * @return 返回参数
     * @throws UpyztException 异常
     */
    public static BalanceTxnPaginationResp page(Map<String, Object> params) throws UpyztException {
        return page(params, null);
    }

    /**
     * 电子账簿流水查询
     *
     * @param params  请求参数
     * @param options 参数选项
     * @return 返回参数
     * @throws UpyztException 异常
     */
    public static BalanceTxnPaginationResp page(Map<String, Object> params, RequestOptions options) throws UpyztException {
        return APIResource.request(RequestMethod.GET, classURL(BalanceTransaction.class), params, BalanceTxnPaginationResp.class, options);
    }


}
